package com.beauty.services;

import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.stereotype.Service;

import java.io.IOException;

@Service
public class MyBaitsHelp {
    public final SqlSessionFactory factory;

    MyBaitsHelp() throws IOException {
        var inputStream = Resources.getResourceAsStream("mybaits-config.xml");
        this.factory = new SqlSessionFactoryBuilder().build(inputStream);
    }

}
